//import ... from ...语句导入，从vue框架中导入createApp函数
import { createApp } from 'vue'

//导入css样式，不需要from字句
//import './style.css'
import 'element-plus/dist/index.css'

//从./App.vue页面导入组件，组件名为：App（可以自定义）
import App from './App.vue' //根组件
import LoginView from './view/LoginView.vue'
// import DashboardView from './view/DashboardView.vue'

import ElementPlus from 'element-plus'

//导入router组件
import router from './router/router.js'

//注册图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
let app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

//利用上面导入的createApp函数，创建一个vue应用，mount是挂载到#app上
app.use(ElementPlus).use(router).mount('#app')
